/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.trino.jdbc.tuple.protocol;


/**
 * MYSQL 字段类型及标识定义接口
 *
 * mysql FieldPacket type:
 *              The code for the column's data type. Also known as
 *              "enum_field_type". The possible values at time of
 *              writing (taken from  include/mysql_com.h), in hexadecimal:
 *                          0x00   FIELD_TYPE_DECIMAL
 *                          0x01   FIELD_TYPE_TINY
 *                          0x02   FIELD_TYPE_SHORT
 *                          0x03   FIELD_TYPE_LONG
 *                          0x04   FIELD_TYPE_FLOAT
 *                          0x05   FIELD_TYPE_DOUBLE
 *                          0x06   FIELD_TYPE_NULL
 *                          0x07   FIELD_TYPE_TIMESTAMP
 *                          0x08   FIELD_TYPE_LONGLONG
 *                          0x09   FIELD_TYPE_INT24
 *                          0x0a   FIELD_TYPE_DATE
 *                          0x0b   FIELD_TYPE_TIME
 *                          0x0c   FIELD_TYPE_DATETIME
 *                          0x0d   FIELD_TYPE_YEAR
 *                          0x0e   FIELD_TYPE_NEWDATE
 *                          0x0f   FIELD_TYPE_VARCHAR (new in MySQL 5.0)
 *                          0x10   FIELD_TYPE_BIT (new in MySQL 5.0)
 *                          0xf6   FIELD_TYPE_NEWDECIMAL (new in MYSQL 5.0)
 *                          0xf7   FIELD_TYPE_ENUM
 *                          0xf8   FIELD_TYPE_SET
 *                          0xf9   FIELD_TYPE_TINY_BLOB
 *                          0xfa   FIELD_TYPE_MEDIUM_BLOB
 *                          0xfb   FIELD_TYPE_LONG_BLOB
 *                          0xfc   FIELD_TYPE_BLOB
 *                          0xfd   FIELD_TYPE_VAR_STRING
 *                          0xfe   FIELD_TYPE_STRING
 *                          0xff   FIELD_TYPE_GEOMETRY
 *
 *
 *  @author fengyang(yueny09@163.com)
 *  @date 2022年06月08日 上午10:36
 *
 */
public interface FieldsProtocol {

    /** field data type */
    int FIELD_TYPE_DECIMAL = 0;
    int FIELD_TYPE_TINY = 1;
    int FIELD_TYPE_SHORT = 2;
    int FIELD_TYPE_LONG = 3;
    int FIELD_TYPE_FLOAT = 4;
    int FIELD_TYPE_DOUBLE = 5;
    int FIELD_TYPE_NULL = 6;
    int FIELD_TYPE_TIMESTAMP = 7;
    int FIELD_TYPE_LONGLONG = 8;
    int FIELD_TYPE_INT24 = 9;
    int FIELD_TYPE_DATE = 10;
    int FIELD_TYPE_TIME = 11;
    int FIELD_TYPE_DATETIME = 12;
    int FIELD_TYPE_YEAR = 13;
    int FIELD_TYPE_NEWDATE = 14;
    int FIELD_TYPE_VARCHAR = 15;
    int FIELD_TYPE_BIT = 16;

    int FIELD_TYPE_NEW_DECIMAL = 246;
    int FIELD_TYPE_ENUM = 247;
    int FIELD_TYPE_SET = 248;
    int FIELD_TYPE_TINY_BLOB = 249;
    int FIELD_TYPE_MEDIUM_BLOB = 250;
    int FIELD_TYPE_LONG_BLOB = 251;
    int FIELD_TYPE_BLOB = 252;
    int FIELD_TYPE_VAR_STRING = 253;
    int FIELD_TYPE_STRING = 254;
    int FIELD_TYPE_GEOMETRY = 255;

}
